package com.aiyige.model.moment.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;

public class SingleVideo implements MultiItemEntity {

    /**
     * 单个视频的封面
     */
    private String cover;
    /**
     * 单个视频的标题
     */
    private String title;
    /**
     * 单个视频是否免费，1-是
     */
    private Integer free;
    /**
     * 单个视频的时长
     */
    private Long duration;
    /**
     * 单个视频的文件大小，单位: MB
     */
    private Long size;
    /**
     * 单个视频的链接URL
     */
    private String url;
    /**
     * 状态，新增时 0-正常，1-删除
     */
    private Integer status;
    /**
     * 七牛文件持久id
     */
    private String persistentId;
    /**
     * 标签排序用的
     */
    private int index;

    public String getPersistentId() {
        return persistentId;
    }

    public void setPersistentId(String persistentId) {
        this.persistentId = persistentId;
    }

    public boolean isBuyed() {
        return buyed;
    }

    public void setBuyed(boolean buyed) {
        this.buyed = buyed;
    }

    private boolean buyed;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getFree() {
        return free;
    }

    public void setFree(Integer free) {
        this.free = free;
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    public boolean isFree() {
        return free != null && free == 1;
    }


    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    private boolean isSelected;

    @Override
    public int getItemType() {
        return 0;
    }
}
